package cn.changhong.user.aop;

import lombok.Data;

import java.io.Serializable;

/**
 * @Author zz
 * @Date
 **/
@Data
public class ResultBean<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    public static final int SUCCESS = 20000;
    public static final int BAD_REQUEST = 40000;
    public static final int NOTFOUND = 40004;
    public static final int CONFLICT=40005;
    public static final int UNEXPECTED=40017;


    public static final int NO_PERMISSION = 2;

    private String msg = "success";

    private int code = SUCCESS;

    private T data;

    public ResultBean() {
        super();
    }

    public ResultBean(T data) {
        super();
        this.data = data;
    }

    public ResultBean(Throwable e,int code) {
        super();
        this.msg = e.toString();
        this.code = code ;
    }
}
